package com.yingxin.yxerp.module.dingtalk.entity;

/**
 * 上传临时素材 类型
 */

public enum WeComFileTypeEnums {

    IMAGE("image", "图片"),
    VOICE("voice", "语音"),
    VIDEO("video", "视频"),
    FILE("file", "普通文件");

    private String type;

    private String typeName;

    WeComFileTypeEnums(String type, String typeName) {
        this.type = type;
        this.typeName = typeName;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getTypeName() {
        return typeName;
    }

    public void setTypeName(String typeName) {
        this.typeName = typeName;
    }

    public static WeComFileTypeEnums getEnum(String type) {
        if (type == null) {
            return null;
        }
        for (WeComFileTypeEnums i : WeComFileTypeEnums.values()) {
            if (i.getType().equals(type)) {
                return i;
            }
        }
        return null;
    }

}
